﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using StockTrader.BusinessService.DataContract.Mortgate;

namespace MortgageMonitor.BSL
{
    public class Shared
    {
        public static void ClearControls(Control topControl)
        {
            // Ignore the control unless it is a text box.
            if (topControl.GetType() == typeof(TextBox))
            {
                topControl.Text = "";
            }
            else
            {
                // Process controls recursively.
                // This is required if controls contain other controls
                // (for example, if you use panels, group boxes, or other
                // container controls).
                foreach (Control childControl in topControl.Controls)
                {
                    ClearControls(childControl);
                }
            }
        }

    }


}
